package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.sql.SQLException;


/**
 *
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    /**
     * @throws SQLException
     */
    @Override
    public void save() throws SQLException {
        System.out.println("Service的update方法执行了");

        userDao.save();
    }

    @Override
    public void select() {

        try {
            userDao.select();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void del(int i) throws SQLException {
        userDao.del(i);
    }

    @Override
    public void update() throws SQLException {
        userDao.update();
    }


}
